package com.huluspace.chat.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
public class WebClientConfig {
  @Value("${weather.api.path}")
  private String apiPath; // 天气API路径
  /**
   * 创建并配置WebClient Bean用于访问天气API
   */
  @Bean
  public WebClient webClient(WebClient.Builder builder) {
    return builder.baseUrl(apiPath).build();
  }
}
